package com.wzw.basics.concurrent;

import com.wzw.basics.concurrent.thread.Deadlock;
import com.wzw.basics.concurrent.thread.LifeCycle;
import com.wzw.basics.concurrent.thread.ThreadPool;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @author Wangzhiwen
 */
public class Main {

    public static void pool() {
        ThreadPoolExecutor executor = ThreadPool.defaultParamsPoolExecutor(ThreadPool.ThreadNames.TEST);
        executor.execute(() -> System.out.println(Thread.currentThread().getName()));
    }

    public static void main(String[] args) {
        Thread thread = LifeCycle.newCycle(2);
        thread.start();
        pool();
        Deadlock.start();
        ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
    }

}